<!-- 第三方考级详情 -->
<template>
	<view class="container">
		<view class="c-rich">
			<view class="rich-content">
				<mp-html :content="testInfo.content" />
			</view>
			<!-- <view class="rich-btn">
				<view @click="toApplication">
					<text>前往报名</text>
				</view>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		name:"testOtherDetail",
		data() {
			return {
				// 考级信息
				testInfo:{},
				testId:''
			}
		},
		onLoad(query){
			this.testId = query.id
			this.getTestOtherDetail(query.id)
		},
		onShareAppMessage() {
			return {
				title: this.testInfo.name,
				path: '/pages/pages_test/testOtherDetail?id'+this.testId
			}
		},
		onShareTimeline() {},
		methods: {
			// 获取考级详情
			getTestOtherDetail(id){
				this.$http.getTestOtherDetail({id}).then(res=>{
					this.testInfo = res
				})
			},
			// 跳转第三方应用
			toApplication(){
				uni.$u.toast("正在唤起第三方APP")
			}
		}
	}
</script>

<style scoped lang="scss">
	.container{
		.c-rich{
			width: 100%;
			.rich-content{
				
			}
			.rich-btn{
				padding: 15rpx 30rpx;
				background-color: #ffd53a;
				position: fixed;
				bottom: 50rpx;
				left: 50%;
				transform: translateX(-50%);
			}
		}
	}
</style>
